
	<link rel="stylesheet" href="__PUBLIC__/css/bootstrap-3.3.5/css/bootstrap.min.css" />
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/style.css">
	<script src="__PUBLIC__/js/jquery-1.11.3.min.js"></script>
	<script src="__PUBLIC__/css/bootstrap-3.3.5/js/bootstrap.min.js"></script>
	<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<!--主窗体-->
<div class="container app" style="width:auto">
	<!-- mainCon -->
	<div id="mainCon" class="mainCon" style="width:auto">
		<h4>审核提现</h4>
		<form class="form-horizontal" id="myform" name="myform">
			<div class="form-group">
				<label for="title" class="col-sm-2 control-label">	<if condition="$info['paytype'] == '1'">开户名</if><if condition="$info['paytype'] == '2'">支付宝账号</if></label>
				<div class="col-sm-5">
					<input type="text" class="form-control" name="name" readonly="readonly" id="name" value="<{$info['name']}>" placeholder="文章标题">
				</div>
			</div>
			
			<div class="form-group">
				<label for="title" class="col-sm-2 control-label">提现金钱</label>
				<div class="col-sm-5">
					<input type="text" class="form-control" name="money" readonly="readonly" id="money" value="<{$info['money']}>" placeholder="文章标题">
				</div>
			</div>
			
			<div class="form-group">
				<label for="title" class="col-sm-2 control-label">手机电话</label>
				<div class="col-sm-5">
					<input type="text" class="form-control" name="mobile" readonly="readonly" id="mobile" value="<{$info['mobile']}>" placeholder="文章标题">
				</div>
			</div>
			
			<if condition="$info['paytype'] == '1'">					
				<div class="form-group">
					<label for="title" class="col-sm-2 control-label">开户行</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" name="bankname" readonly="readonly" id="bankname" value="<{$bank_info['bankname']}>" placeholder="开户行">
					</div>
				</div>
				
				<div class="form-group">
					<label for="title" class="col-sm-2 control-label">开户卡号</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" name="payaccount" readonly="readonly" id="payaccount" value="<{$bank_info['payaccount']}>" placeholder="开户卡号">
					</div>
				</div>	
				
				<div class="form-group">
					<label for="title" class="col-sm-2 control-label">银行地址记录</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" name="bankpath" readonly="readonly" id="bankpath" value="<{$bank_info['bankpath']}>" placeholder="银行地址记录">
					</div>
				</div>
			</if>
			<div class="form-group">
				<label for="title" class="col-sm-2 control-label">状态</label>
				<div class="col-sm-5">
					<div class="btn btn-default" disabled>
						<if condition="$info['status'] eq 0">
							申请中
						<elseif condition="$info['status'] eq 1"/>
							已完成
						<elseif condition="$info['status'] eq -1"/>
							作废
						</if>
					</div>
				</div>
			</div>
			
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<input type="hidden" name="id" value="<{$info['id']}>"/>
					<if condition="$info['status'] != '-1' and $info['status'] != '1'">	
					<button  onclick="return pass(this)" data-status="1" class="btn btn-default col-sm-2">确认发放</button>
					<button  onclick="return pass(this)" data-status="-1" style="margin-left:25px" class="btn btn-default col-sm-2">作废</button>
					</if>
				</div>
			</div>
		</form>
		<input type='hidden' name="aid" id="aid" value="<{$info['id']}>">
	</div>
	<!-- mainCon// -->
	
</div>
<!--主窗体//-->

<script src="__PUBLIC__/js/layer/layer.js"></script>
<script src="__PUBLIC__/js/validate/jquery.validate.min.js"></script>
<script src="__PUBLIC__/js/validate/messages_zh.js"></script>
<script>
function pass(obj){
	var status = $(obj).attr('data-status');
	var aid    = $('#aid').val();
	var pn = $("#pn").val();
	
	if(status == 1){
		var text = "是否确认发放佣金？";
		var url = "<{:U('Withdrawal/Withdrawal_Edit')}>";
	}else if(status == -1){
		var text = "您确定该提现作废？";
		var url = "<{:U('Withdrawal/Withdrawal_Invalid')}>";
	}
	
	var index =	layer.confirm(text, {
		btn: ['确定','取消'] //按钮
	}, function(){		
		$.post(url,{id:aid,status:status,p:pn},function(r){
			if(r.error == '0'){
				layer.alert(r.errmsg,{icon: 1},function(){
					window.top.location.reload();
					var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
					parent.layer.close(index); //再执行关闭  
					
				});
			}else{
				layer.alert(r.errmsg,{icon: 2});
			}
		},'json');
	}, function(){
		layer.close(index);
	});

	return false;
}
</script>

<include file="Public/footer" /> 